package com.sdp.wx.db.wx_contract_payment.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsp
 * @since 2024-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wx_contract_payment")
public class WxContractPayment extends Model<WxContractPayment> {

    private static final long serialVersionUID=1L;

    /**
     *  内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 合同编号
     */
    @TableField("contract_code")
    private String contractCode;

    /**
     * 支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    /**
     * 支付比例
     */
    @TableField("pay_ratio")
    private BigDecimal payRatio;

    /**
     * 支付日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("pay_time")
    private LocalDate payTime;

    /**
     * 备注
     */
    @TableField("pay_remark")
    private String payRemark;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
